package com.cloudkinto.enumType.order.shelf;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.cloudkinto.vo.common.CommonKvVo;

import java.util.ArrayList;
import java.util.List;

/**
 * @author long
 */

public enum OrderInputShelfStatusEnum implements IEnum<Integer> {
    /**
     *
     */
    zero(0, "待上架"),
    one(1, "上架中"),
    two(2, "已上架");

    private final Integer value;

    public String getDesc() {
        return desc;
    }

    private final String desc;

    OrderInputShelfStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    public static List<CommonKvVo> getOrderInputShelfStatusList() {
        List<CommonKvVo> list = new ArrayList<>();
        for (OrderInputShelfStatusEnum orderInputShelfStatus : values()) {
            list.add(
                    CommonKvVo.builder()
                            .label(orderInputShelfStatus.desc)
                            .value(orderInputShelfStatus.getValue())
                            .build()
            );
        }
        return list;
    }
}
